<?php
// +----------------------------------------------------------------------
// | 设置专利订单联系人信息
// +----------------------------------------------------------------------
// | Copyright (c) 2015
// +----------------------------------------------------------------------
// | Author: baiping 125618036@qq.com http://www.webipcode.com
// +----------------------------------------------------------------------
// |2016-1-15 上午11:55:43
// +----------------------------------------------------------------------
?>

<?php $this->load->view('public/header');?>
<link href="<?php echo __STATIC__?>bootstrap3/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="<?php echo __STATIC__?>bootstrap3/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet">
<!--  CSS -->
<link href="<?php echo __STATIC__?>jsshow/css/bootstrap-modal-bs3patch.css" rel="stylesheet" />
<link href="<?php echo __STATIC__?>jsshow/css/bootstrap-modal.css" rel="stylesheet" />

<div class="col-md-12">
	<form name="setform" id="setform" action="<?php echo site_url('order/setpatentorderstatus/'.$info->id)?>" class="form-horizontal" style="padding-top:20px" method="post">
		 <div class="form-group col-md-12">
		 	<label>订单状态</label>
		 	<SPAN class="clearfix"></SPAN>
			<div class="radio-inline">
			  <label>
			    <input type="radio" name="status" value="1" <?php if($info->status == 1){echo 'checked';}?>>已联系
			  </label>
			</div>
			<div class="radio-inline">
			  <label>
			    <input type="radio" name="status" value="2" <?php if($info->status == 2){echo 'checked';}?>>关闭
			  </label>
			</div>
			<div class="radio-inline">
			  <label>
			    <input type="radio" name="status" value="3" <?php if($info->status == 3){echo 'checked';}?>>已完成
			  </label>
			</div>
		</div>	
		<div class="form-group col-md-12">
			<label>备注信息</label>
			<textarea class="form-control" rows="3" name="instro"><?php echo $info->instro;?></textarea>
		</div>
		<div class="col-md-12">
			<div class="modal-footer" style="text-align: center;">
				<button type="button" id="submit" value="Submit" class="btn btn-primary">提交信息</button>
			</div>
		</div>
	</form>
</div>

<script type="text/javascript" src="<?php echo __STATIC__?>bootstrap3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo __STATIC__?>js/jquery.form.js"></script>
<script type="text/javascript">
$().ready(function() {
	$("#submit").click(function(){
		var posturl = $("#setform").attr('action');
		$.post(posturl, $("#setform").serialize(), function(res){
			if(res.status > 0) {
				$("#setform").clearForm();//清除表单数据
				message_box.show(res.info, 'success');
				setTimeout(function(){window.location.href=res.url}, 3000);//跳转
			}else if (res.status <= 0) {
				message_box.show(res.info, 'error');
				if( res.url.length > 0 ){
					setTimeout(function(){window.location.href=res.url}, 3000);//跳转
				}	
				return false;
			}
		})
	})         
});
</script>
</body>
</html>